const hardPlugin = require("hard-source-webpack-plugin")
const  {resolve}  = require("path")


module.exports = {
    lintOnSave: false,
    publicPath: "./",
    configureWebpack: {
        plugins: [
            new hardPlugin({
                //不添加放进node包里，分出来容易管理
                cacheDirectory: resolve(__dirname, "cache")
            })
        ],
        // 路径别名
        resolve: {
            alias: {
                "@a": resolve(__dirname, "src/assets"),
                "@c": resolve(__dirname, "src/components"),
                "@p": resolve(__dirname, "src/plugins"),
                "@r": resolve(__dirname, "src/router"),
                "@s": resolve(__dirname, "src/store"),
                "@u": resolve(__dirname, "src/utils"),
                "@v": resolve(__dirname, "src/views")
            }
        }
    }
}